<template>
  <el-select
    class="link-select"
    popper-class="link-list"
    @change="change"
    v-model="value"
  >
    <el-option
      v-for="item in options"
      :key="item.value"
      :label="item.label"
      :value="item.value"
    >
    </el-option>
  </el-select>
</template>

<script>
export default {
  name: "Link1",
  data() {
    return {
      options: [
        {
          value: "1",
          label: "招生专题",
          link: "https://www.sdwcvc.edu.cn/zs/",
        },
        {
          value: "2",
          label: "特色名校建设",
          link: "http://222.207.224.28:8070/firstpage.aspx",
        },
        {
          value: "3",
          label: "大学章程建设",
          link: "https://www.sdwcvc.edu.cn/dxzcjs/",
        },
        {
          value: "4",
          label: "教师荣誉榜",
          link: "https://www.sdwcvc.edu.cn/tpliebiao.jsp?urltype=tree.TreeTempUrl&wbtreeid=1354",
        },
        {
          value: "5",
          label: "防范非法集资专栏",
          link: "https://www.sdwcvc.edu.cn/ffffjz.htm",
        },
        {
          value: "6",
          label: "党建工作网",
          link: "https://www.sdwcvc.edu.cn/djgz/",
        },
      ],
      value: "- - - - -专题站点- - - - -",
    };
  },
  methods: {
    change(value) {
      let obj = {};
      obj = this.options.find((item) => {
        return item.value === value;
      });
      this.value = obj.label;
      window.location.href = obj.link;
    },
  },
};
</script>
